package com.hj.dapp.config.exp;

import lombok.Data;

/**
 * @author 胡奥程
 * @version 1.0
 * @date 2023/12/29
 */
@Data
public class BusinessErrorException extends RuntimeException{

    /**
     * 异常码
     */
    private Integer code;
    /**
     * 异常提示信息
     */
    private String message;

    public BusinessErrorException(BusinessErrorEnum businessErrorEnum) {
        super(businessErrorEnum.getMsg());
        this.code = businessErrorEnum.getCode();
        this.message = businessErrorEnum.getMsg();
    }
}
